home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 30 / PC Gamer IT CD 30 1-2.iso / MOTS / GAMEDATA / EPISODE / JKM_PCG.GOO / cog_s1l2_shipexplode.cog < prev    next >
Text File  |  1998-02-25  |  831b  |  53 lines

  1. # Jedi Knight Cog Script
  2. #
  3. # S1L2_shipexplode.COG
  4. #
  5. # Ship explosion for end of level S4L2
  6. #
  7. # [DB]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10.  
  11. symbols
  12.  
  13. message        damaged
  14.  
  15. thing        ship                    mask=-1
  16.  
  17. sound        shipexplode
  18.  
  19. thing        ghost0
  20. thing        ghost1
  21. thing        ghost2
  22.  
  23. template    explosion_tpl=+tief_exp         local
  24.  
  25. flex     curdamage=0                   local
  26. flex        damage
  27.  
  28. end
  29.  
  30.  
  31. code
  32.   
  33. damaged:
  34.  
  35.    curdamage=curdamage + GetParam(0);
  36.  
  37.    if (curdamage<damage) Return;
  38.  
  39.     DestroyThing(ship);
  40.     playsoundpos(shipexplode, getthingpos(ship), 1.0, -1, -1, 0);
  41.  
  42.     // make 3 ghost objects explode with raildet explosion
  43.     CreateThing (explosion_tpl, ghost0);
  44.     Sleep (0.05);
  45.    CreateThing (explosion_tpl, ghost1);
  46.    Sleep (0.05);
  47.    CreateThing (explosion_tpl, ghost2);
  48.  
  49.     return;
  50.  
  51. end
  52.  
  53.